#pragma once

#include <iostream>
#include <unistd.h>
#include <fcntl.h>
#include <cstring>
#include <cerrno>

using namespace std;

void setNonBlock(int fd)
{
    int f1 = fcntl(fd, F_GETFL);
    if(f1 < 0)
    {
        cerr << "fcntl: " << strerror(errno) << endl;
        return;
    }
    fcntl(fd, F_SETFL, f1 | O_NONBLOCK);
}

void printLog()
{
    cout << "this is a log" << endl;
}

void download()
{
    cout << "this is a download" << endl;
}

void executeSql()
{
    cout << "this is a executeSql" << endl;
}